import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { FilePath } from '@ionic-native/file-path/ngx';
import { SearchHistoryPage } from '../search-history/search-history.page';
import { AboutUsPage } from './../coms/settings-page/about-us.page';

import { TabsPage } from './tabs.page';


const routes: Routes = [
  {
    path: 'home',
    component: TabsPage,
    children: [
      {
        path: 'tab1',
        children: [
          {
            path: '',
            loadChildren: '../tab1/tab1.module#Tab1PageModule'
          },
          {
            path: 'navSeven',
            component: SearchHistoryPage
          }
        ]
      },
      // {
      //   path: 'details',
      //   children: [
      //     {
      //       path: '',
      //       loadChildren: '../tab1/tab1.module#Tab1PageModule'
      //     },
      //     {
      //       path: 'navSeven',
      //       component: SearchHistoryPage
      //     }
      //   ]
      // },
      {
        path: 'tab2',
        children: [
          {
            path: '',
            loadChildren: '../tab2/tab2.module#Tab2PageModule'
          },
          {
            path: 'navSeven',
            component: SearchHistoryPage
          }
        ]
      },
      {
        path: 'tab3',
        children: [
          {
            path: '',
            // component: MypagePage
            // loadChildren: '../tab3/page/mypage/mypage.module#MypagePageModule'
            loadChildren: '../tab3/tab3.module#Tab3PageModule'

          },
          {
            path: 'navSeven',
            component: SearchHistoryPage
          }
        ]
      },
      {
        path: 'tab4',
        children: [
          {
            path: '',
            loadChildren: '../tab4/tab4.module#Tab4PageModule'

          },
          {
            path: 'navSeven',
            component: SearchHistoryPage
          }
        ]
      },
      {
        path: 'tab5',
        children: [
          {
            path: '',
            loadChildren: '../tab5/tab5.module#Tab5PageModule'

          },
          {
            path: 'navSeven',
            component: SearchHistoryPage
          }
        ]
      },
      // {
      //   path: '',
      //   redirectTo: '/home/tab1',
      //   pathMatch: 'full'
      // }
    ]
  },
  {
    path: '',
    redirectTo: 'home/tab1',
    pathMatch: 'full'
  },
  {
    path: 'return_url',
    // redirectTo: 'home',
    // pathMatch: 'full'
  },
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class TabsPageRoutingModule { }
